/*
显示器抽象层
*/
#ifndef __DISPLAY_H_
#define __DISPLAY_H_
#include "stdint.h"
#include "fonts.h"

// 字体选择 : Font_7x10, Font_11x18, Font_16x26 改完记得去fonts.h里面打开对应的编译宏定义
#define FONT Font_7x10	// 字体选择,只需要改字体就行了

//提供多种显示，正常用行距的倍数来表示
#define Display_spaced  (FONT.height)         //行距
#define Display_firstRow (FONT.height * 0)       //（y）第一行
#define Display_secondRow (FONT.height * 1)
#define Display_thirdRow (FONT.height * 2)
#define Display_fourthRow (FONT.height * 3)
#define Display_fifthRow (FONT.height *4)
//#define Display_fifthRow 180
#define Display_firstCol 0     //（x）第一列
#define Display_OneChar (FONT.width)
#define Display_lastCol 100

#define RED 1

void displayStr(char *str, int x, int y, int color);
void displayNum(int32_t num, int x, int y);
void displayNum_len(uint32_t num, int x, int y, int len);
void displayFloat(float num,int x,int y);
void displayColor(uint16_t x, uint16_t y, uint16_t color);
void display_Init(void);

void displayClean(void);

void displayCleanLine(uint16_t y);

#endif // !1 __DISPLAY_H_

